<?
include_once "conn.php";
include_once "main.php";


//get the successstories
$q1 = "select * from job_story order by story_id desc";
$r1 = mysql_query($q1) or die(mysql_error());

if(mysql_num_rows($r1) > '0')
{
	echo "<table align=center width=90% class=BlackText>\n<br><span align=center class=HeaderClass>Success Stories</span><br><br><span class=BlackLink>Click <a class=TNA href=\"add_story.php\">here</a> to add your success story!</span><br><br>";

	while($a1 = mysql_fetch_array($r1))
	{
		$story_len = strlen($a1[story]);

		if($story_len < 200)
		{
			$short = $a1[story];
		}
		else
		{
			$short = substr($a1[story], 0, 200);
		}

		echo "<tr>\n\t<td bgcolor=#F0F7FF style=padding:5px>$short  <a class=TNA href=\"read_story.php?id=$a1[story_id]\">...read more...</a></td>\n</tr>\n\n";
	}

	echo "</table>";
}
else
{
	echo "<br><br><center><span class=BlackLink>Click <a class=TNA href=\"add_story.php\">here</a> to add your success story!</span></center>";
}




include_once('footer.php'); 

?>